<?php

$this->breadcrumbs=array(
	'Purchase'=>array('index'),
	'View Purchase',
);
$tempQuoNo='';
foreach($modelHeader as $mdlHeader){
	$tempQuoNo= $mdlHeader->quotation_no;
}

$this->menu=array(
	array('label'=>'List Quotation', 'url'=>array('index')),
	//array('label'=>'testing','url'=>array('#','linkOptions'=>array('onclick'=>'js:history.go(-1);returnFalse;'))),
	array('label'=>'Add Item', 'url'=>array('purchaseorderdetail/create','quo_no'=>$tempQuoNo)),
);
?>

<h1>View Quotation</h1>


<?php echo CHtml::beginForm( Yii::app()->createUrl('purchaseorderheader/viewPDF&quo_no='.$tempQuoNo)); ?>
<?php echo CHtml::submitButton('Generate',array('')); ?>
<?php echo CHtml::endForm(); ?> 


<h3>Header</h3>

<?php
$myclass = get_class($this);
$myclass= strstr($myclass,'Controller',true);
/*$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'purchase-order-header-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		
	),
)); */

$this->widget('application.extensions.tablesorter.Sorter', array(
    'data'=>$modelHeader,
    'columns'=>array(
		'quotation_no',
		'customer',
		'attention',
		'project',
		'date',
		'currency',
	),
	'filters'=>array(
        'filter-false',
		'filter-false',
        'filter-false',
        'filter-false',
        'filter-false',
		'filter-false',
    ),
	'page'=>'QuotationOrderHeaderView',
	'isViewQuotation'=>true,
));

?>
<br />
<h3>Detail</h3>
<?php
$model=new Customer;
$this->widget('application.extensions.tablesorter.Sorter', array(
    'data'=>$modelDetail,
    'columns'=>array(
		//'quotation_no',
		'product_pn',
		'additional',
		'qty',
		'uom',
		'productPn.unit_buy',
	),
	'filters'=>array(
        //'filter-false',
		'filter-select',
        'filter-false',
        'filter-false',
        'filter-select',
		'filter-false',
    ),
	'page'=>'PurchaseOrderDetail',
	'model'=>3,
));
?>